/*
*	Developed by Leonardo Chatain and Pedro Dusso, at Universidade Federal do Rio Grande do Sul, Brasil, 2009/1
*	Source available at glpacman.codeplex.com
*/

#include "Point3D.h"

Point3D::Point3D() {
	x = y = z = 0;
}

Point3D::Point3D(float X, float Y, float Z) {
	x = X;
	y = Y;
	z = Z;
}

Point3D::~Point3D() { }

float Point3D::getDistanceTo(Point3D other) {
	float sqrX = other.x - x;
	sqrX *= sqrX;
	float sqrY = other.y - y;
	sqrY *= sqrY;
	float sqrZ = other.z - z;
	sqrZ *= sqrZ;
	return sqrt(sqrX + sqrY + sqrZ);

}